﻿<Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"  xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Luna" xmlns:Custom="http://schemas.microsoft.com/wpf/2008/toolkit" x:Class="VariationGeneration.Window1"
    Title="Variation Generator" Height="600" Width="800" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" WindowStartupLocation="CenterScreen">
    <Window.Resources>
        <Style  TargetType="{x:Type Button}">
            <Style.Triggers>
                <Trigger Property="IsEnabled" Value="False">
                    <Setter Property="Opacity" Value="0.6" />
                </Trigger>
            </Style.Triggers>
        </Style>
        <Style x:Key="iconbutton_style" TargetType="{x:Type Button}">
            <Style.Triggers>
                <Trigger Property="IsEnabled" Value="False">
                    <Setter Property="Opacity" Value="0.2" />
                </Trigger>
            </Style.Triggers>
        </Style>
    	
    	
    	<Style x:Key="ComboBoxStyle1" TargetType="{x:Type ComboBox}">
    		<Setter Property="SnapsToDevicePixels" Value="true"/>
    		<Setter Property="Foreground" Value="{StaticResource OutsideFontColor}"/>
    		<Setter Property="Template" Value="{DynamicResource ComboBoxTemplate}" />
    	</Style>
    	
    	
    </Window.Resources>
	<Viewbox Margin="0,0,9,5" d:LayoutOverrides="Width">       
		<Grid Width="633" Height="459">
            <!-- 
            <Grid.Background>
				  <RadialGradientBrush Center="0.54326,0.45465" RadiusX="0.602049" RadiusY="1.02049" GradientOrigin="0.4326,0.45465">
                <GradientStop Color="#4957FFE6" Offset="0"/>
                <GradientStop Color="#E6008EE7" Offset="0.718518495559692"/>
                <GradientStop Color="#192C0072" Offset="1"/>
            </RadialGradientBrush>            
			</Grid.Background> 
            -->
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="0.997*" />
				<ColumnDefinition Width="0.003*" />
			</Grid.ColumnDefinitions>
			<Canvas x:Name="ParticleHost"  HorizontalAlignment="Left" VerticalAlignment="Top" >
				<TabControl SelectionChanged="TabControl_SelectionChanged" IsSynchronizedWithCurrentItem="True" TabIndex="2147483644" BorderBrush="Black" Foreground="#FF6EAAFF" BorderThickness="0" Width="605" Height="418.736" Canvas.Left="18" Canvas.Top="24">
           
					<TabItem x:Name="Parameterstab" Header="Parameters" BorderBrush="#FF6EAAFF" BorderThickness="0">
						<Grid Width="590" Height="386.959">
							<Button Click="Addbtn_Click" Height="23.147" HorizontalAlignment="Right" IsEnabled="False" Margin="0,48,35,0" x:Name="Add_Para_btn" VerticalAlignment="Top" Width="75" Content="Add"  TabIndex="0" IsDefault="True" Style="{DynamicResource ButtonStyle1}" />
							<Label Height="23" HorizontalAlignment="Left" Margin="42,24,0,0" x:Name="label1" VerticalAlignment="Top" Width="132" Content="Parameter Name" HorizontalContentAlignment="Left" VerticalContentAlignment="Center" />
							<Label Height="26" Margin="183,21,155,0" x:Name="label2" VerticalAlignment="Top" Content="Value (Separate with comma(,))" VerticalContentAlignment="Center" />
							<TextBox Height="23.147" HorizontalAlignment="Left" Margin="45,48,0,0" x:Name="textBox1" VerticalAlignment="Top" Width="126" BorderBrush="LightBlue" />
							<TextBox Height="23.147" Margin="187,48,133,0" x:Name="textBox2" VerticalAlignment="Top" BorderBrush="LightBlue" />
            		
							<Button x:Name="button6" Click="Listview1_removebtn_Click"  HorizontalAlignment="Right" IsEnabled="False" Width="34" VerticalAlignment="Bottom" Height="28" Margin="0,0,15,26" Style="{DynamicResource iconbutton_style}" >
								<Image Source="Image\delete.png" ToolTip="Delete the selected row(s)" />
							</Button>
							<Button x:Name="Load_button" Click="Load_button_Click" Height="31.956" HorizontalAlignment="Left" Margin="3,111,0,0"  VerticalAlignment="Top" Width="39" Visibility="Visible" BorderBrush="#FF6EAAFF" Foreground="White" ToolTip="Load Text/Excel file" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
								<Image Source="Image\Office_open.png" ToolTip="Load Text/Excel file to import data" />
							</Button>                   
							<ListView PreviewDragOver="listView1_PreviewDragOver" PreviewDrop="listView1_PreviewDrop"  Height="205" HorizontalAlignment="Left" Margin="52,110,0,0" x:Name="listView1" VerticalAlignment="Top" Width="527" AllowDrop="True" BorderBrush="LightBlue" />
						</Grid>
					</TabItem>
					<TabItem  x:Name="Constaintstab" Header="Constrains" BorderThickness="0" Margin="-1,0,1,0">
						<Grid Width="602" Height="394">
							<ListBox x:Name="Par_ListBox" SelectionChanged="Par_ListBox_SelectionChanged"  IsSynchronizedWithCurrentItem="True" Margin="2,81,0,151" Width="79" HorizontalAlignment="Left" BorderBrush="LightBlue" />
							<ListBox x:Name="Values_listBox" Width="79" IsSynchronizedWithCurrentItem="True" HorizontalAlignment="Left" Margin="150,81,0,151" BorderBrush="LightBlue" />
							<Button x:Name="button2" IsEnabled="False"  Click="button2_Click" Width="30" Margin="238.5,194,333.5,176.723" Style="{DynamicResource iconbutton_style}" >
								<Image Source="Image\right.png" />
							</Button>
							<Button x:Name="button3" IsEnabled="False"  Click="button3_Click" Width="30" Margin="238.5,100,333.5,0" VerticalAlignment="Top" Height="23.277" Style="{DynamicResource iconbutton_style}" >
								<Image Source="Image\right.png" />
							</Button>
                   
							<Label Margin="285,85,0,0" VerticalAlignment="Top" Content="If" HorizontalAlignment="Left" Height="24.277" Width="14" FlowDirection="RightToLeft" Foreground="Green" HorizontalContentAlignment="Left" VerticalContentAlignment="Center" />
							<Label Margin="275.007,193,0,177.723" Content="Then" HorizontalAlignment="Left" Width="24.993" Foreground="Green" FlowDirection="RightToLeft" />
							<TextBox x:Name="Iftextbox" Margin="0,85,201,0" VerticalAlignment="Top" Text="" TextWrapping="Wrap" Height="63.277" IsEnabled="False" HorizontalAlignment="Right" Width="96" IsReadOnly="True" />
							<TextBox TextChanged="Thentextbox_TextChanged" x:Name="Thentextbox" Text="" TextWrapping="Wrap" Margin="0,192,201,132.723" IsEnabled="False" HorizontalAlignment="Right" Width="96" IsReadOnly="True" />
							<ListBox x:Name="listBox3" HorizontalAlignment="Right" Margin="0,79.723,11,124.277" Width="148" IsSynchronizedWithCurrentItem="True" SelectionMode="Multiple" BorderBrush="LightBlue" />

							<Button x:Name="button4" IsEnabled="False"  Click="button4_Click" Width="30" Margin="408.5,153,163.5,0" VerticalAlignment="Top" Height="23.277" Style="{DynamicResource iconbutton_style}" >
								<Image Source="Image\right.png" />
							</Button>
							<Label HorizontalAlignment="Left" Margin="0,52,0,0" VerticalContentAlignment="Center"  VerticalAlignment="Top" Width="79" Height="25" Content="Parameters"/>
							<Label HorizontalAlignment="Left" VerticalAlignment="Top" VerticalContentAlignment="Center"  Width="79" Height="25" Content="Values" Margin="146,52,0,0"/>
							<Button x:Name="button5" Click="button5_Click"  IsEnabled="False" HorizontalAlignment="Right" Width="34" VerticalAlignment="Bottom" Height="28" Margin="0,0,21,82" Style="{DynamicResource iconbutton_style}">
								<Image Source="Image\delete.png" ToolTip="Delete the selected row(s)" />
							</Button>
							<ComboBox x:Name="expression_combobox" HorizontalAlignment="Left" Margin="86,143,0,0" VerticalAlignment="Top" Width="60" BorderBrush="LightBlue" Style="{DynamicResource ComboBoxStyle1}"/>
							<Button x:Name="If_And_button" Click="If_And_button_Click" IsEnabled="False" HorizontalAlignment="Right" Margin="0,52,268,0" VerticalAlignment="Top" Width="29" Height="25" Content="And" Style="{DynamicResource ButtonStyle1}" />
							<Button x:Name="If_Or_button" Click="If_Or_button_Click" IsEnabled="False" HorizontalAlignment="Right" Margin="0,52,223,0" VerticalAlignment="Top" Width="29" Height="25" Content="Or" Style="{DynamicResource ButtonStyle1}"/>
							<Button x:Name="Then_And_button" Click="Then_And_button_Click" IsEnabled="False" HorizontalAlignment="Right" Margin="0,161,268,0" VerticalAlignment="Top" Width="29" Height="25" Content="And" Style="{DynamicResource ButtonStyle1}"/>
							<Button x:Name="Then_Or_button" Click="Then_Or_button_Click" IsEnabled="False" HorizontalAlignment="Right" Margin="0,161,223,0" VerticalAlignment="Top" Width="29" Height="25" Content="Or" Style="{DynamicResource ButtonStyle1}"/>
						</Grid>
					</TabItem>

					<TabItem x:Name="Resulttab" Header="Result" BorderBrush="#FF6EAAFF" BorderThickness="0" Margin="-1,0,1,0">
						<Grid Width="597" Height="391">
							<ListView Margin="45,69,45,90" x:Name="listView2" BorderBrush="LightBlue"/>
							<Button x:Name="Generatebtn" Click="Generatebtn_Click" Margin="156,21.362,0,0" VerticalAlignment="Top" Height="24" Content="Generate" Width="86" HorizontalAlignment="Left" Style="{DynamicResource ButtonStyle1}"/>
							<ComboBox x:Name="ComboBox1" HorizontalAlignment="Left" Margin="45,21.362,0,0" VerticalAlignment="Top" Width="47" Height="24" IsSynchronizedWithCurrentItem="True" d:LayoutOverrides="VerticalMargin" HorizontalContentAlignment="Center" />
							<Label HorizontalAlignment="Left" Margin="95,26.724,0,0" VerticalAlignment="Top" Width="39" Height="18.638" Content="Way" Foreground="Green"/>
							<Button HorizontalAlignment="Right" Margin="0,0,46.5,45.277" VerticalAlignment="Bottom" Width="34" Height="32" x:Name="Exportbutton" Click="Exportbutton_Click" IsEnabled="False"  Style="{DynamicResource iconbutton_style}">
								<Image Source="Image\Office_SaveAs.png" ToolTip="Save as to HTML/Excel file"/>
							</Button>

						</Grid>
					</TabItem>
				
				</TabControl>
				<Grid Width="28.5" Height="26" Canvas.Left="594.5" Canvas.Top="6" d:IsHidden="True" ScrollViewer.VerticalScrollBarVisibility="Hidden">
					<Button x:Name="Help" Click="Help_Click" BorderBrush="#FF6EAAFF" Foreground="White">
						<Image Source="Image\info.png" ToolTip="Help file" />
					</Button>
				</Grid>
			</Canvas>
		</Grid>
	
   
	</Viewbox>
	
   
</Window>
